<script type="module">
import {ref} from "vue";
export default {
  setup() {
    let count = ref(1);

    function increase() {
      count.value++;
    }

    function decrease() {
      count.value--;
    }

    return {
      count,
      increase,
      decrease,
    }
  }
}
</script>

<template>
  <div>
    <button @click="increase">+</button>
    {{ count }}
    <button @click="decrease">-</button>
  </div>
</template>

<style scoped>
button {
  margin: 10px;
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
}
</style>
